home *** CD-ROM | disk | FTP | other *** search
- ; DESC: Changes to a new directory using the path provided V1.00
- ; IN: *{SEG_VAL} segment and
- ; *{OFFSET} offset of path string
- ; SAMPLE: Callm CHG_DIR,<SEG_VAL,OFFSET>,
- ; ##################################################################
-
- Extrn PUSHALL:Near
- Extrn POPALL:Near
- Extrn ERRORMSG:Near
-
- CHG_DIRC Segment
- Assume CS:CHG_DIRC
- Public CHG_DIR
-
- ;notice.
- DB 'CHG_DIR - V1.00, Copyright 1987, CoreTechs ',0DH,0AH
-
- CHG_DIR Proc Near ;changes to a new directory.
- Call PUSHALL
-
- Pop DX ;get the filename offset.
- Pop DS ;get the segment offset.
-
- Mov AH,3BH ;change to a new directory.
- Int 21H
- Jc ERROR ;if error occurs, report it.
-
- Call POPALL
- Ret
-
- ERROR: Push AX ;report error any and abort.
- Call ERRORMSG
-
- CHG_DIR Endp
- CHG_DIRC Ends
- End